package com.m;

import com.m.utils.ApplicationUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.BeansException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(scanBasePackages = "com.m")
@MapperScan(basePackages	= {"com.m.dao.mapper"})
@EnableTransactionManagement
public class Application implements ApplicationContextAware {
  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }

  @Override
  public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    ApplicationUtil.setApplicationContext(applicationContext);
  }
}
